# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints do
  @moduledoc """
  IndexPrivateEndpoints proto is used to provide paths for users to send requests via private endpoints (e.g. private service access, private service connect). To send request via private service access, use match_grpc_address. To send request via private service connect, use service_attachment.

  ## Attributes

  *   `matchGrpcAddress` (*type:* `String.t`, *default:* `nil`) - Output only. The ip address used to send match gRPC requests.
  *   `pscAutomatedEndpoints` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PscAutomatedEndpoints.t)`, *default:* `nil`) - Output only. PscAutomatedEndpoints is populated if private service connect is enabled if PscAutomatedConfig is set.
  *   `serviceAttachment` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the service attachment resource. Populated if private service connect is enabled.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :matchGrpcAddress => String.t() | nil,
          :pscAutomatedEndpoints =>
            list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PscAutomatedEndpoints.t())
            | nil,
          :serviceAttachment => String.t() | nil
        }

  field(:matchGrpcAddress)

  field(:pscAutomatedEndpoints,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PscAutomatedEndpoints,
    type: :list
  )

  field(:serviceAttachment)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
